<template>
    <div class="homebox">
      <div class="top">
        <h3>饿了么</h3>
        <van-search v-model="value" shape="round" background="#01a3ff" placeholder="请输入搜索关键词" />
      </div>
      <van-swipe :autoplay="3000">
        <van-swipe-item v-for="(image, index) in images" :key="index">
          <img v-lazy="image" />
        </van-swipe-item>
      </van-swipe>
    </div>
  
  </template>
  
  <script>
  export default {
    setup() {
      images: [
          'https://img01.yzcdn.cn/vant/apple-1.jpg',
          'https://img01.yzcdn.cn/vant/apple-2.jpg',
        ]
    },
  }
  </script>
  
  <style scoped>
  * {
    padding: 0;
    margin: 0;
  }
  
  .homebox {
    height: 100%;
  }
  
  .homebox .top {
    background-color: #01a3ff;
    padding: 10px;
  }
  
  .homebox .top h3 {
    color: white;
    margin-bottom: 10px;
  }
  </style>